package com.example.mapboot.utils;

import lombok.Data;

@Data
public class Response {
    private int code;

    private boolean status;

    private Object object;

    public static Response success(Object object){
        Response response = new Response();
        response.setCode(200);
        response.setStatus(true);
        response.setObject(object);
        return response;
    }

    public static Response error(Object object){
        Response response = new Response();
        response.setCode(500);
        response.setStatus(false);
        response.setObject(object);
        return response;
    }
}
